package com.example.user.app;

import android.database.Cursor;

import java.util.Date;

/**
 * Created by hzn on 14-6-26.
 */
public class Contact {
    private int id;
    private String name;
    private String mobileNumber;
    private long createAt;

    private Contact() {}

    public static Contact createFromCursor(Cursor c) {
        Contact contact = new Contact();
        contact.setId(c.getInt(Contacts.COLUMN_ID));
        contact.setName(c.getString(Contacts.COLUMN_NAME));
        contact.setMobileNumber(c.getString(Contacts.COLUMN_MOBILE_NUMBER));
        contact.setCreateAt(c.getLong(Contacts.COLUMN_CREATE_AT));

        return contact;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getMobileNumber() {
        return mobileNumber;
    }

    public long getCreateAt() {
        return createAt;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setMobileNumber(String mobileNumber) {
        this.mobileNumber = mobileNumber;
    }

    public void setCreateAt(long createAt) {
        this.createAt = createAt;
    }
}
